<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Father(uname, age) {
            this.uname = uname
            this.age = age
        }
        Father.prototype.sing = function(){
            console.log('会唱歌')
        }
        function Son (uname, age) {
            Father.call(this, uname, age)
        }
        Son.prototype = new Father()
        Son.prototype.construct = Son
        const son = new Son('ls',14)
        const father = new Father('ws',36)
        son.sing()
        father.sing()
    </script>
</body>

</html>